package com.bsoft.exchange.controller.price;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bsoft.exchange.domain.QueryDrugs;
import com.bsoft.exchange.domain.QueryTreatment;
import com.bsoft.exchange.pojo.PricePojo;
import com.bsoft.exchange.response.ResponseEntity;
import com.bsoft.exchange.service.QueryPriceService;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value = "price")
public class PriceController {
	@Autowired
	private QueryPriceService queryPriceService;
	@ApiOperation(value = "药品价格查询")
	@RequestMapping(value = "/queryDrugs",method = RequestMethod.POST,produces = "application/json")

	public ResponseEntity<List<QueryDrugs>> queryDrugs(@RequestBody PricePojo pricePojo)  {
		ResponseEntity<List<QueryDrugs>> entity=new ResponseEntity();
		
		List<QueryDrugs> queryDrugsList = queryPriceService.queryDrugs(pricePojo);

		entity.setData(queryDrugsList);
		return entity;

	}
	
	@ApiOperation(value = "诊疗价格查询")
	@RequestMapping(value = "/queryTreatment",method = RequestMethod.POST,produces = "application/json")

	public ResponseEntity<List<QueryTreatment>> queryTreatment(@RequestBody PricePojo pricePojo)  {
		ResponseEntity<List<QueryTreatment>> entity=new ResponseEntity();
		
		List<QueryTreatment> queryTreatmentList = queryPriceService.queryTreatment(pricePojo);

		entity.setData(queryTreatmentList);
		return entity;

	}

}
